Rate this script:  I Love it  /   I Hate it

PHP - Finger PHP Simple Client


Code


<?php
        // Client di Finger

        $fp = fsockopen('kernel.org', 79); // Si collega al seguente server nella porta 79
       
        fputs($fp, '@kernel.org\n'); // Manda una richiesta
       
        echo '<table border=\'0\' cellspacing=\'1\' cellpadding=\'1\' bgcolor=\'black\'>';
       
        while( !feof($fp) )
        {       
                $text = fgets($fp, 128); // Ritorna una risposta

                if(trim($text) != '')
                {
                        echo '<tr bgcolor=\'white\'>';
                        echo '<td>';
                        echo '<font face=\'Arial\' size=\'-2\'>' . trim($text) . '</font>';
                        echo '</td>';
                        echo '</tr>';
                }
        }
       
        echo '</table>';
       
        fclose($fp);
?>
 

 

 
PHP - Finger PHP Simple Client scripts | PHP - Finger PHP Simple Client snippet | PHP - Finger PHP Simple Client example | PHP - Finger PHP Simple Client tutorial | PHP - Finger PHP Simple Client code